package TUILayer;
import java.util.Scanner;
import java.util.ArrayList;
import ControlLayer.OrderCTR;
import ModelLayer.*;

public class OrderUI
{
    private OrderCTR orderCTR;
    public OrderUI()
    {
        orderCTR = new OrderCTR();
    }
    private int startOrderMenu()
    {
        Scanner keyboard = new Scanner(System.in);
        System.out.println("\f *** Order Menu ***");
        System.out.println(" (1) Create order");
        System.out.println(" (2) Delete order");
        System.out.println(" (3) Find order");
        System.out.println(" (4) Return");
        System.out.print("\n Make your choise: ");
            
        int choise = keyboard.nextInt();
        return choise;
    }
    public void start()
    {
        OrderMenu();
    }
    private void OrderMenu()
    {
        boolean exit = false;
        while(!exit)
        {
            int choise = writeOrderMenu();
            if(choise == 1)
            {
                startCreateOrder();
            }
            else
            {
                exit = true;
            }
        }
    }
    private int writeOrderMenu()
    {
        Scanner keyboard = new Scanner (System.in);
        System.out.println("\f *** Sale Menu ***");
        System.out.println(" (1) Create Order");
        System.out.println(" (2) Delete Order");
        System.out.println(" (3) Find Order");
        System.out.println(" (4) Return");
        System.out.print("\n Make your choise: ");
        
        int choise = keyboard.nextInt();
        return choise;
    }
    private void deleteOrder()
    {
        
    }
     public String inputBuyerPhone()
    {
        Scanner keyboard = new Scanner(System.in);  
        System.out.println(" Write phone number of customer: ");
        String phone = keyboard.nextLine();
        return phone;
    }
    public String inputStaffPhone()
    {
        Scanner keyboard = new Scanner(System.in);  
        System.out.println(" Write phone number of staff: ");
        String phonestaff = keyboard.nextLine();
        return phonestaff;
    }
    public String inputOrderDate()
    {
        Scanner keyboard = new Scanner(System.in);  
        System.out.println(" Write phone number of staff: ");
        String orderDate = keyboard.nextLine();
        return orderDate;
    }
    public int inputSpecimenID()
    {
        Scanner keyboard = new Scanner(System.in);  
        System.out.println(" Write Serial Number of the wanted Product specimen: ");
        int serial = keyboard.nextInt();
        return serial;
    }
    public int inputProductID()
    {
        Scanner keyboard = new Scanner(System.in);  
        System.out.println(" Write ID of the wanted Product: ");
        int id = keyboard.nextInt();
        return id;
    }
    public int inputOrderID()
    {
        Scanner keyboard = new Scanner(System.in);  
        System.out.println(" Write ID of the wanted sale: ");
        int orderID = keyboard.nextInt();
        return orderID;
    }
    public void startCreateOrder()
    {
        int id = inputProductID();
        int serial = inputSpecimenID();
        String phone = inputBuyerPhone();
        String phonestaff = inputStaffPhone();
        int orderID = inputOrderID();

     
    }
}